{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# I - Coordinates, Grids and Fields\n",
    "\n",
    "HCIPy is a Python library for high-contrast imaging simulations. It uses the concept of a `Field` to simplify syntax and avoid user error. The concept of `Field`s, and their corresponding `Grid`s and `Coords` is an integral part of HCIPy and is used throughout the codebase. This first chapter will focus on ways to create, modify and use `Field`s.\n",
    "\n",
    "First let's import HCIPy, and a few supporting libraries:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from hcipy import *\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A `Grid` defines a set of points in space. There are many functions available for creating a `Field` from scratch. One of these is `make_uniform_grid()`. This function creates a regularly-spaced grid of points in $N$-dimensions in Cartesian space. The following code creates a `Grid` and plots the set of points using Matplotlib."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEJCAYAAACKWmBmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAFl5JREFUeJztnX+sZVdVgL/F9AdIS5m2xALyGEENU0up8iYotVh+iCVSS4iNrWVKMThoUWggBBMtP0z9gYgpJkQYCDQZTAaL6ACt1kCZoS2CM5PSCBOjiFJCrQydAm0BO1OXf9wz5XLnzXlv3j373f3e/r7k5Z27z7nrW3Pmzqx77tp3n8hMREREjsYjZp2AiIjUjYVCRER6sVCIiEgvFgoREenFQiEiIr1YKEREpBcLhYiI9GKhEBGRXiwUIiLSy3GzTmAITj/99NywYcOs0xARWTXs3bv3G5n5uKUcuyYKxYYNG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c1P3+B7gjIg4HjiR0RTi/xs6t4i4snPeMeaePOZE4LXAC8bGTuteiN8DHpzmP7zl5hYRjwTWZeYDwHeAgwx43qbIK4A3AYcy8/Vj44Odswn2Ac8GdiyQz5eAszv/HN9fg+dQRDwWuB/YwKj4laAvN7p3v2cBV2TmQ93Y4fP0IKOrsGW/7qfI69TMPMD3X1dQyTnruAZ4+Vi+K3HO+liZ19lKfLY2qx9GzfrtwNcZvTt5Rje+HTij2/5zYBfwKWBDN3Yp8BlGn+1dUCi3kxm9IHcBH2J0qTiZ2xuA35p43vXArcBtwEtmkRvww9352QV8EnjaSpy3JeT1HOBeRp/P7gTeU/KcAeuAbV0+NzL6vPha4Jxu/+vHvM/sxp7bnaN/Al5R8LV/1NwYfZb93bHztKN7zl90ud4GvGoGeT0C+PTYz7m1nLNu/8XA2yaeU/ycdZ53Af8J/D2jN44r+jrzC3ciItJL681sERFZBAuFiIj0YqEQEZFeLBQiItKLhUJERHqxUIiISC8WChER6cVCITIwEfGrEfHPEXFctyLpbRHxgsWfKVInfuFOpAARsQ34N0bLUKzPzDfOOCWRZWOhEClAtwDhHuB/gOdm5sFFniJSLX70JFKGZLSw3WMYrSEksmrxikKkAN1HTzczuqfBiZn5mhmnJLJs1sQy4yI10d1D5JTM/EC3JPveiHhhZv7jrHMTWQ5eUYiISC/2KEREpBcLhYiI9GKhEBGRXiwUIiLSi4VCRER6sVCIiEgvFgoREenFQiEiIr38P07+6Ov0IRtJAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f35eba20>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "grid = make_uniform_grid([64,64], [2,1])\n",
    "\n",
    "plt.plot(grid.x, grid.y, '+')\n",
    "plt.axis('equal')\n",
    "plt.xlabel('x')\n",
    "plt.ylabel('y')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Depending on the coordinate system of the `Grid`, it exposes the arguments `x`, `y`, `z` for Cartesian coordinates, or `r`,`theta` for polar coordinates. Simply said, the `Grid` facilitates the conversion between an index, and a point in $N$-dimensional space.\n",
    "\n",
    "The coordinate values for each dimension are stored internally in a `Coords` object. There exist some variants of this type of object. Each of these derived classes indicates a structure in the coordinate values. For instance, in the case above:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Class of grid: <class 'hcipy.field.coordinates.RegularCoords'>\n",
      "Distance between points: [ 0.03125   0.015625]\n",
      "Number of points on each dimension: [64 64]\n",
      "Zero-point of the grid: [-0.984375  -0.4921875]\n"
     ]
    }
   ],
   "source": [
    "print('Class of grid:', grid.coords.__class__)\n",
    "print('Distance between points:', grid.delta)\n",
    "print('Number of points on each dimension:', grid.dims)\n",
    "print('Zero-point of the grid:', grid.zero)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A `RegularCoords` object doesn't store the values of each point explicitly, but rather calculates those on the fly from three parameters: 1) the distance between points, 2) the number of points on each dimension, 3) the zero point.\n",
    "\n",
    "Let's use another coordinate system, and differently structured coordinates. We explicitly show how a `Grid` is constructed."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD7CAYAAACMlyg3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAFHhJREFUeJzt3X+IXOd97/H3V7ur2K5cVbZkK44lq7hQ4uY6TRjTND8ccSnc+DYJxZjiNjV1eosoGIJqaHF7yyX45nIDve41l5rSvSn4prT4giENJcahf1RKTChkRZ02OHWSP1qp9Q+tLUeRtLa1u/r2jzmjjMez2t2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0IbuM5UZt8n1uqdR6kfS/pPxpz84bR6N/7VmXmjQARcTfwe8BnJtuioczKv8ldABFxM/Ak8IFxbHfqQ2A7t7+MiKuAucy8AKwAqyNs2rbUfBvPidvo+1Tl+9nqtqIrwMKYmzaM54APAl+mob/3rYiIa4E3M/MiDfs7GMD3gdsBIuIgU3wNoYi4LjPPMOZ/k6kPgY30u/0l8BLwpYhYBdaYgn707dzGc0q0gM9FxArtP9hfn3B7tuOrwK9Uv/cLwKcm3J5BHQK+EBGv097h/MZkm7M9EfEY8FHgRuAR4KmIeAYIpqii6f4eEfG/gT+IiM7isQ3WO1lMkgpW4sCwJKliCEhSwQwBSSqYISBJBTMEJKlghoAkFcwQkKSCGQKSVLB/By7aP/m0LcvBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f329d860>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "r = np.logspace(-1, 1, 11)\n",
    "theta = np.linspace(0,2*np.pi, 11, endpoint=False)\n",
    "coords = SeparatedCoords((r, theta))\n",
    "\n",
    "polar_grid = PolarGrid(coords)\n",
    "cart_grid = polar_grid.as_('cartesian')\n",
    "\n",
    "plt.plot(cart_grid.x, cart_grid.y, '+')\n",
    "plt.axis('equal')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that to plot the points of this polar grid, we have converted the polar grid to a Cartesian grid. Accessing the Cartesian coordinates on a polar grid is not allowed:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "'PolarGrid' object has no attribute 'x'\n"
     ]
    }
   ],
   "source": [
    "try:\n",
    "    print(polar_grid.x) # Doesn't work\n",
    "except AttributeError as err:\n",
    "    print(err)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Each `Grid` also stores the weight of each point, that is, the interval, area, volume or hyper-volume that a point subtends in its space. They can be used to simplify doing integrations or taking derivatives on a `Grid`. In some cases, the weights can be calculated automatically, for example when the grid has regular or separated coordinates. For other coordinate structures, the weights must be supplied by the user, for example for an `UnstructuredCoords`.\n",
    "\n",
    "A `Field` is a sampled function on a `Grid`. They can be though of as a physical field, sampled on each point of a `Grid`. We can simply construct a field by:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAADuCAYAAADPwDeGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztnX+MXNd1379n3vxYLknxh6iEki1XaIKgclxVrUU4tiWBjRtHAtK4gKuCgkRbTgValQFZjVs4TptIVlQghm1EyV82a6SEZSMCHCNW4Agmmh+SLKQxRMKyawsNkgaOaimUTFLLH7vcnZk3p3/MW3nuuXfn3nkzw9038/0Ag9373n333vfe7Nnzzjs/RFVBCCGkmtQ2ewGEEELKQyFOCCEVhkKcEEIqDIU4IYRUGApxQgipMBTihBBSYSjECSGkwlCIE0JIhaEQJ4SQClPf7AUQQshm8Iv/crueOZsn9T353bXjqnrblJdUCgpxQshccvpsjm8df3NS38bV/3fflJdTGgpxQsicosi1t9mLGBsKcULIXKIAeqh+AkAKcULI3NIDNXFCCKkkCkWH5hRCCKkmCiCnOYUQQqoLbeKEEFJRFEA+A5XNKMQJIXNL9S3iFOKEkDlFobSJE0JIVVEFOtWX4RTihJB5RZBDNnsRY0MhTgiZSxRAj5o4IYRUF2rihBBSUfrBPhTihBBSSRRAR6tfF4dCnBAylygE+QwUN6MQJ4TMLT2lOYUQQioJbeKEEFJpBDlt4oQQUk36lX0oxAkhpJKoCtqabfYyxoZCnBAyt/RoEyeEkGrSf7FJcwoh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K/UBMnhJAKQyFOCCFVZey8KFsCCnFCyHyiQGJlwy0NhTghZH5h2D0hhFQUVaBHIU4IIdWFLzYJIaS6KDVxQgipKtMvCnE5oBAnhMwnTIBFCCHVRQEow+4JIaSiKItCEEJIpdEZMKeIzoBhnxBCRkVEvgFgX2L306p62zTXUxYKcUIIqTC1zV4AIYSQ8lCIE0JIhaEQJ4SQCkMhTgghFYZCnBBCKgyFOCGEVBgKcUIIqTAU4oQQUmEoxAkhpML8f62gWvYg1JwjAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f3550630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "values = np.exp(-(grid.x**2 * 10)) * np.sin(20 * grid.y)\n",
    "field = Field(values, grid)\n",
    "\n",
    "imshow_field(field)\n",
    "plt.colorbar()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A field can be shown by using `imshow_field()`, which acts very similar to the standard Matplotlib `pyplot.imshow()` function. It however does some things in the background. The axes are set to the correct values, according to the `Grid` of the `Field`. Additionally, it supports many other features. For instance, a complex valued field is automatically converted to a two-dimensional colorscale."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAADJCAYAAAAgl4m4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztnXusZld53p917jNnzlw948GGgTqEYOOAW7DahotM0yKi0iZSi2QUzKWiJgWpsYJQ/2kurajUqEIl/at1UWsJKrmi/cNpg2Kpicy1qWwLrIADARw8+DKe8Zxz5tzvq398e44P3/4956w9e+bMN+z3kSzPeb+13/0+67bf911rr51yzgoEA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/lK5tvfZhN9votz25XEPseu+U0nskvUvSRyQp5/wZSZ9JKY1L+mpK6X/ueDBcS1g7c86/Utn6akn/Q9Lf2q38PmCvOv3bkpZyzt+VrmudtkJnJ/zcy7fd0y9PKX1CvXD4qer/T0OZcUm/Kenv7pCdqBp8RdLa1ZyUrtTWlNKEpOGc86KkJUnr6uUcT6eURtX7SFrKOdO3C/fb1iTpdyRt5Jw/tUN+zep1B56W9EvqrSH02/ZDSW+ubDmjV85T2UgpHZW0oF7u94VrYFdTW1V5m3dK+kjOebOSXa7DNfUipqvW3i3sPJ5zntYr/VIa0Dqt8BlJH778x3Wq0/a43jmlQftP0pR6Df8VSf9dvTBT6nmtp6t/f1rSP+u77kuSvi7pG5J+bRBslXSzpG9Wv/+JpDdWv3+gkv+ZpPcOiK3vkjSjXh73MUn/ab/qVb3Fwy9Utn1Zvbz959RboJOkT+2w4a2V7N1VHf5fSR/dx/5pbVVvjWF5Rx0+Ul3zHyrbvyHp4wNg55Ckr+747+2DWqfV7++X9Pt91+x7nV6N/+LFq0AgEOgIYtE2EAgEOoKY8AOBQKAjiAk/EAgEOoKY8AOBQKAjiAk/EAgEOoKY8AOBQKAjiAk/EAgEOoKY8AOBQKAj+P8qkfeXJULdLgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f365e278>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "values2 = np.exp(1j * grid.x * 20) * np.sqrt(np.abs(np.sinc(5*grid.y)))\n",
    "field2 = Field(values2, grid)\n",
    "\n",
    "imshow_field(field2)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "These images can be extremely useful for viewing both phase and amplitude of a complex speckle field at the same time. Additionally, it supports masking out parts of the array during plotting:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAA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NL0PNPOqk3pRMRKSRsnhPdJelK9HzPPdv31kh7KzD2SlJm3NPGLJD0cEZuyGQpMZ10z89ebMn5DvR+X3zfhmpA0aUu1JuG5vkfSgsz8snR+n+sEZ6qbO3bWtpxHZ7x3RLxF0hsk3SRJmXmHpDsiYr6kByPin/r+YzifivXMzLc2dX2JpH+U9FtnOn8KnO2Z/rakw5n5PWlan2kn1Xb42cu3XTMxHhG3qvfj8Hebvx8358yX9CFJv9MXW9G84UcljU9mp3SudY2IBZLmZOaYpMOSjquXc1wZEXMlzVdvae6pGVDXkPRxSScy8yN98fP2XPs8Lum16s0hTKzbjyVd1dRllX6+n8qJiFgm6ZB6ud8nz0O9hq2rmtHmlZJuysyTTez0MxxX7yemSXu/O9RzeWbu08+/LqUZ+kwbd0h6z+l/TNMz7W66c0oz7Y+kJeq98Q9I+gf1fsyUeqPWlc3rj0r6ownX3SfpYUnflPSOmVBXSS+S9K3m+Nclvbw5fkMT/7ak62ZIXd8g6Vn18rhbJX1+qp6repOH9zR126Je3v5O9SboJOkjfXV4dRN7Y/MM/03Se6fw67NYV/XmGI70PcNNzTV/09T9m5JumQH1vEDSg31/XjdTn2lz/J2SPjXhmil/ppPxh1+8AoBKMGkLAJWgwweAStDhA0Al6PABoBJ0+ABQCTp8AKgEHT4AVIIOHwAq8X+QPkbhd0AZXQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f36b22b0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "mask = circular_aperture(0.7)(grid)\n",
    "\n",
    "imshow_field(field2, mask=mask)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The function `circular_aperture(0.7)` here constructs a so-called Field generator. These are functions that take a grid as their sole parameter, and spit out a `Field` on that grid. Essentially, this can be used to calculate any analytical function at a set of points. Some classes and functions in HCIPy take Field generators as arguments, and they are used as output in some cases as well. An important class of Field generators are those generated by aperture functions. These include the above mentioned `circular_aperture`, but also `rectangular_aperture`, `hexagon_aperture`, or even complete telescopes, such as `make_magellan_aperture`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD7CAYAAACITjpPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAADmtJREFUeJzt3U/IXXedx/HPx2hx0YoZXHRVQWEwMQ2R9tmMptQWJEK1qwHFSe1ASUsWKsrs/APC7AbM1tBFIS4e6SrSlhHESU0tDMlDFWxQkIEJGFxopVgRasPXxXOuvTm/+//8+53feb8g5D733Ofe7z3nPN/z+f3uufc6IgQA894zdAEA8kNjAJCgMQBI0BgAJGgMABI0BgAJGgOABI0BQILGACDx3qELmGeb0zB78MADDwxdwkIHBwdDlzAJEeF1t3FOp0TTGPqR0zafZ6/dX9GCTRpDVokB7cj1D3+ddXXTOPpDYxixsTaAXS17vjSM9jH5CCBBYhiJqaWDbSxaN6SIZkgMABIkhgyRDpojRTRDY8gEzaB78+uYJrEaQwkACRLDQEgIw6qvfxLEnUgMABIkhh6REvLF/MOdSAwAEiSGDpEQxon5BxJDZ2gK5ZjitqQxAEgwlGjJFI8qUzK14QWJAUCCxNAQSWGaZtu91OTQKDHYPmL7ku2rtl+0fXTBbe63fcv2iSaPBaA/TYcSZyTdjIjTkvYlPTW/0PZJSc9I+mnDx8kSaQGl7gNNG8MxSbOP9r0m6fhsge37JT0t6auS3ll2B7bP2b5u+3rDWjoXEXf8A6Qy94s25hhuL7n+UUknJf1E0sckfdz2pyPirfkbRcRFSRclPiUayEXTxHBD0l51ea/6WZIUERci4nREPCzpvyX9e70pjEkpRwJ0r4R9pWlj+LGkD9t+WdIXJT1r+4LtU81LAzAU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Y7FmOodU63SuOrtqtYPb3KjrD7arQu2r0fEg0PXsakx1TumWqVx1Tt0rcwxAEjQGAAkptAYLg5dwJbGVO+YapXGVe+gtRY/xwBge1NIDAC2RGMAkCiyMdi+x/Zl21err8y7a8ntHrH9pu27+65xroaVtdr+gO3/sf2K7Vdtf2SAGo/YvlTV+KLto7XlX69qe9X2J/qur26Del+y/TPbB7b3hqqzqmVlrdVt7rd9y/aJvuoqsjFIekLSCxFxWtLrkh6v38D2o5IekfRaz7XVrav1r5I+HxGfkvQ9SWd7rk86/Obym1WN+5Kemi2oduTHJH1S0hckfXeA+uqW1ls5GxEPSXpG0vm+i6tZWavtkzqs86d9FlVqYzgm6aC6fE3S8fmFVVN4OCK+2XdhC6ysNSL+FhF/rn48pWEa2aoaPyrpV3Hopg7P2BvaunX6x+riUOtz3tJabd8v6WlJX5X0Tp9F5XZK9Faqb9Xer139hqRbkm6v+NUzkvZsX9HhzvG8pM92UeNMg1pnv/9lSe+PiB91UN4mVtW4tv4BrKzJ9mckPSTpyV6qWW1ZrY9KOinpJ5I+Junjtj8dEW91XdCoG0NE/F7Sw/XrbZ+XtCfpl9X/N2q/9x9zt70i6V+7rLN6zJ1q9eE7nr4t6Z2I+EbXdS5xQ9K/SLqstMbf6nDnle37lMd7EVbVK9vnJJ2Q9GREDN3UltYaERckXZAk289J+q8+msLswYv7J+meakW/LOmHku6qrt+XdG/ttlck3Z1rrTo8qv2pqvOKpO8PUOMRSZeqGl+SdFSHO+ypavk3JL0i6eeSHshg+y+tV9J9Opy3ma3Py7nWWrvdc5JO9FUXJzgBSJQ6+QigARoDgASNAUCCxgAgQWMAkKAxAEjQGAAkaAwAEn8HRwoAYYDSD/8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f3813a90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pupil_grid = make_pupil_grid(128)\n",
    "aperture = make_magellan_aperture(True)\n",
    "\n",
    "imshow_field(aperture(pupil_grid), cmap='gray')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As the spiders for the Magellan aperture are very small, we have some aliasing effects. This can be avoided using supersampling during the evaluation. HCIPy implements standard functions for these:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD7CAYAAACITjpPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAHFNJREFUeJzt3X9s3PWd5/Hnu8lRoM7WnHMiSFDQEV3irkPMAcLqumUo0WJ2c4tREsXVkeKqIaEEbtOF0yXasDELJyJtEDkBKqHmapT8YStExCu3OFLuSDbZ1lWTbSKyJZbIKm284OiSnhEuoVzcz/0x8/n6x/jHzHd+fL/fmddDsjz2jGfeY898/P68P7/MOYeIyERfiDoAEYkfNQwikkUNg4hkUcMgIlnUMIhIFjUMIpJFDYOIZFHDICJZ1DCISJb5UQcwkZlpGmaRfeEL6bb/S1/6Etdeey0A11xzzaTPV111FfPnl/elcOXKFT7//HMALl++POnzp59+yu9+9zsA/vCHP5Q1rmrgnLO5bhOrhkGKzzcGd999N42NjQA0NDRM+nzLLbdQV1dX1rguXbrEuXPnADh9+vSkzydPnmRgYACA0dHRssYlaRantRLKGMKpqakBYMWKFQC0tLTQ1NQEwPLlyyOLqxhOnToFwMDAAP39/QAcOnQIUKMRVi4ZgxqGhLnxxhsBWL16Na2trQA0NzcDMG/evMjiKqexsTEAjh07BsCBAwd46623ABgaGoosrqTIpWFQ8VFEsihjiDHfRVi9ejXt7e0A3HPPPRFGFH9HjhwBoKurK8gi1OWYTBmDiISijCFGli5dCsCmTZsAgizBZw6SH58pdHV1AfDqq68CcObMmahCigUV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GamQF/A1xxzj1V6jhn8Cvga0Av2TF+QPrFi5l9hXisRZgtXsxsA9AAtDvnom7UZozVObcL2AVgZl3AznI0Cv7BK+4DWJD5RR8BeoCrMt/vBhZNue1hoCausZL+r/Z/M3EeBnZHEOM8YE8mxp8A15F+wTZmrn8KOAb8I3BHDP7+M8YLfIV03cb/PnvjGuuU23UBDeWKSxOcRCRLpRYfRaQAahhEJIsaBhHJooZBRLKoYRCRLGoYRCSLGgYRyaKGQUSy/H85FOGve+O4eQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x237f389c668>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pupil = evaluate_supersampled(aperture, pupil_grid, 8)\n",
    "imshow_field(pupil, cmap='gray')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
